package com.zjh.controller;

import com.zjh.pojo.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "hello控制类")
public class HelloController {

    @ApiOperation("hello方法")
    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String hello() {
        return "hello world";
    }

    @RequestMapping(value = "/user", method = RequestMethod.POST)
    public User user(@ApiParam("用户名") String username) {
        return new User();
    }


}
